<!--
 * @Description: 
 * @Version: 2.0
 * @Autor: 刘世琪
 * @Date: 2021-01-19 14:05:33
 * @LastEditors: Seven
 * @LastEditTime: 2021-01-19 14:53:28
-->
<template>
  <div>
      <mycate :data = "data"/>
      
  </div>
</template>

<script>
import mycate from '@/components/My_Cate'
export default {
    data(){
        return{
            data:{},
        }
    },
    components:{
        mycate
    },
    // 
    mounted:function(){
        this.get_cate()
    },
    methods:{
        get_cate:function(){
            this.axios({
                url:"http://localhost:8000/get_cate/",
            }).then(res=>{
                console.log(res)
                var mytree = {'id':0,name:""};
                mytree['children'] = res.data
                this.data = mytree;
                
            })
        }
    },
}
</script>

<style>

</style>